/********************************************
 * 功能说明: 
 * 模块名称: 
 * 系统名称: 
 * 软件版权: 
 * 系统版本: 1.0.0
 * 开发人员: zhangfb
 * 开发时间: 2019/5/29 19:20
 * 审核人员: 
 * 相关文档: 
 * 修改记录: 修改日期 修改人员 修改说明
 *********************************************/
package com.hyacinth.aurora.core.context;


import com.hyacinth.aurora.constant.ServerChannel;

/**
 * 应用配置类
 * @author zhangfb
 * @version 1.0.0.1
 * @since JDK 1.8
 */
public class AppConfig {
    private AppConfig() {
    }

    // 单例对象
    public static final AppConfig INSTANCE = new AppConfig();

    private String rootPackageName;

    private String serverContextPath;

    private Integer port = 8080;

    private ServerChannel serverChannel = ServerChannel.Netty;


    public String getRootPackageName() {
        return rootPackageName;
    }

    public void setRootPackageName(String rootPackageName) {
        this.rootPackageName = rootPackageName;
    }

    public String getServerContextPath() {
        return serverContextPath;
    }

    public void setServerContextPath(String serverContextPath) {
        if (!serverContextPath.startsWith("/")) {
            serverContextPath = "/" + serverContextPath;
        }
        this.serverContextPath = serverContextPath;
    }

    public Integer getPort() {
        return port;
    }

    public void setPort(Integer port) {
        this.port = port;
    }

    public ServerChannel getServerChannel() {
        return serverChannel;
    }

    public void setServerChannel(ServerChannel serverChannel) {
        this.serverChannel = serverChannel;
    }

}
